/*
    Project Milestone 3
    by Lorenzo Miori [Lorenzo.Miori@stud-inf.unibz.it,
    Matteo Angriman [Matteo.Angriman@stud-inf.unibz.it],
    Nick Preda [Nicolae.Preda@stud-inf.unibz.it]
*/

package DB;
import static DB.GenericDBInterface.*;
import java.sql.Connection;

/**
 *
 * @author Nick
 */
public class PaymentDB extends GenericTableInterface{
    /* Attribute names to be used in SQL query */
    public static final String PAYMENT_TABLE_NAME = "Payment";
    public static final String PAYMENT_ID = "payment_id";
    public static final String PAYMENT_RELATED_CUSTOMER = "related_customer";
    public static final String PAYMENT_TRANSACTION_STATE = "transcation_state";
    public static final String PAYMENT_TOTAL = "total";
    public static final String PAYMENT_EARNEST_AMOUNT = "earnest_amount";
    public static final String PAYMENT_ORDERING[] = {PAYMENT_ID, PAYMENT_RELATED_CUSTOMER, 
                                PAYMENT_TRANSACTION_STATE, PAYMENT_TOTAL, PAYMENT_EARNEST_AMOUNT};
    /* Attribute types */
    public static final int[] PAYMENT_TYPES = {INT, INT, INT, INT, INT};
    
    public PaymentDB(Connection dbConnection){
        /* The generic interface wants to know some stuff...
         * Basic datatypes, the elementary attribute names
         */
        super(dbConnection, PAYMENT_TYPES, PAYMENT_ID,
                                PAYMENT_TABLE_NAME, PAYMENT_ORDERING);
    }
    
}
